Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Working With Pictures and PICT Files


GetPictureFileHeader

The GetPictureFileHeader function extracts the picture frame (the picFrame rectangle in the picture structure) and file header from a specified picture file (PICT file). Your program can use this information to determine how to draw an image without having to read the picture file.

pascal OSErr GetPictureFileHeader (short refNum, Rect *frame,
                                    OpenCPicParams *header);
refNum
Contains a file reference number for the source PICT file.
frame
Contains a pointer to a rectangle that is to receive the picture frame rectangle of the picture file. This function places the picFrame rectangle from the picture structure into the rectangle referred to by the frame parameter. If you are not interested in this information, pass nil in
this parameter.
header
Contains a pointer to an OpenCPicture parameters structure. The GetPictureFileHeader function places the header from the specified picture file into the structure referred to by the header parameter. Note that this function always returns a version 2 header. If the source file is a version 1 PICT file, the GetPictureFileHeader function converts the header into version 2 format before returning it to your application. See Inside Macintosh: Imaging for more information about picture headers and the OpenCPicture function. If you are not interested in this information, pass nil in this parameter.
DESCRIPTION
The GetPictureFileHeader function always returns a version 2 PICT file header. If the specified picture file is a version 1 file, the GetPictureFileHeader function synthesizes a version 2 header from the information available in the file header.

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
File Manager errors


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996